package com.itbaizhan;

import java.io.FileReader;

public class TestTryWithResource02 {
    public static void main(String[] args) {
        try(FileReader reader = new FileReader("d:/a.txt")){
            char c = (char) reader.read();
            char c1 = (char) reader.read();//原先是int类型，现在转为char
            System.out.println(""+c+c1);
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
